<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui" xmlns:h="http://java.sun.com/jsf/html" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:loodel="http://java.sun.com/jsf/composite/component">
>
<ui:composition template="/WEB-INF/template/mainTemplate.xhtml">
    <ui:param name="activePage" value="schedule"/>
    <ui:define name="metadata">
        <f:metadata>
            <f:event type="preRenderView" listener="#{memberTimeSlotScheduleController.init}"/>
        </f:metadata>
    </ui:define>
    <ui:define name="content">
        <div>
            <h1>Schedule Overview</h1>
            <h:form id="scheduleForm">
                <p:messages errorClass="error" autoUpdate="true"/>

                <loodel:learningEventSummary id="eventSummary"
                                             learningEventVoteData="#{memberTimeSlotScheduleModel.learningEventVoteData}"/>
                <p:schedule id="scheduler" value="#{memberTimeSlotScheduleModel.scheduleModel}"
                            widgetVar="scheduleWidget" draggable="false" resizable="false"
                            firstHour="8" allDaySlot="true" timeFormat="HH:mm">
                    <p:ajax event="eventSelect" listener="#{memberTimeSlotScheduleController.onEventSelect}"
                            update="@form"/>
                </p:schedule>
            </h:form>
        </div>
        <div class="clear"></div>
    </ui:define>
</ui:composition>
</html>
